package com.zkq.graduate.service.impl;

import com.zkq.graduate.mapper.PermissionMapper;
import com.zkq.graduate.pojo.Permission;
import com.zkq.graduate.service.PermissionService;
import io.jsonwebtoken.lang.Collections;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author zhangkaiqiang
 * @Date 2019/12/2  22:51
 * @Description TODO
 */
@Service("permissionService")
public class PermissionServiceImpl implements PermissionService {


	@Resource
	private PermissionMapper permissionMapper;

	@Override
	public List<Permission> listAllPermission(String roleId) {
		List<Permission> list=permissionMapper.listAllPermission(roleId);
		if(Collections.isEmpty(list)){
			return new ArrayList<>();
		}
		return list;
	}
}
